Remove Python 3.13 version cap on lgpio dependency - #1107
Merged
makermelissa merged 1 commit intoApr 21, 2026
Conversation
- Change lgpio requirement from 'lgpio;python_version<"3.13"' to 'lgpio>=0.2.2.0' so it installs on Python 3.13+ - Pin >=0.2.2.0 to avoid the broken empty stub (0.0.0.2) on piwheels - Remove unused yellow_text() function and raspberry_pi variable that were only used for the now-removed manual install warning - Remove post-install warning about manual lgpio installation The version cap was preventing lgpio from being installed on Python 3.13+ which broke GPIO on Raspberry Pi 5. The lgpio dependency is only included when running on Raspberry Pi hardware (checked via /proc/device-tree/compatible). Pre-built aarch64 wheels for Python 3.13 and 3.14 are available at: https://github.com/adafruit/lgpio-python-wheels Fixes adafruit#1016
makermelissa-ai-assistant
force-pushed
the
fix-lgpio-version-cap
branch
from
April 21, 2026 23:30
3f8303f to
2b1932b
Compare
makermelissa
approved these changes
Apr 21, 2026
makermelissa
left a comment
Collaborator
There was a problem hiding this comment.
Looks good and makes sense.
makermelissa
pushed a commit
that referenced
this pull request
Apr 22, 2026
When installing on a Raspberry Pi and lgpio is not already available, print guidance directing users to either: - Install via apt: sudo apt-get install -y python3-lgpio - Use pre-built wheels from adafruit/lgpio-python-wheels This helps users who encounter build failures when pip tries to compile lgpio from source without swig and other build dependencies. Follow-up to #1107
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
setup.pypinned lgpio topython_version<'3.13', which meantpip install adafruit-blinkaon Python 3.13+ would skip lgpio entirely, breaking GPIO on Raspberry Pi 5.On 3.13, the post-install message told users to install lgpio manually, but the upstream source tarball fails to build without
swigandliblgpio— so most users hit a dead end.Fixes #1016
Changes
lgpio;python_version<'3.13'→lgpio>=0.2.2.0— installs on all Python versions>=0.2.2.0to skip the broken empty stub (0.0.0.2) on piwheelsyellow_text()function andraspberry_pivariableThe lgpio dependency is only included when running on Raspberry Pi hardware (guarded by
/proc/device-tree/compatiblecheck), so this has no effect on non-Pi platforms.Pre-built wheels
Since there are no aarch64 lgpio wheels on PyPI, pre-built statically linked wheels for Python 3.13 and 3.14 are now available at:
https://github.com/adafruit/lgpio-python-wheels
Users in a venv with
--system-site-packageswill pick up the apt-installedpython3-lgpioautomatically.Testing
Tested on Raspberry Pi 5 (aarch64, Python 3.13.5, Raspberry Pi OS Trixie):
pip installin--system-site-packagesvenv — picks up apt lgpio 0.2.2.0lgpio.gpiochip_open(0)works (pinctrl-rp1, 54 lines)